home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / MISC / MAG08.ZIP / SCRLLX01.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1996-04-30  |  934 b   |  56 lines

  1. Program Prllx01;
  2.  
  3. Uses Mode13h,Crt;
  4.  
  5. Var Xland,Width:Integer;
  6.  
  7. Procedure ScrollUpLand;
  8. Begin
  9.      WaitVbl;
  10.      Move(Mem[Vp[2]:320],Mem[Vp[2]:0],63680);
  11.  
  12.      Line(0,199,319,199,2,Vp[2]);
  13.  
  14.      Line(Xland,199,Xland+Width,199,1,Vp[2]);
  15.      Xland:=Xland+Random(5)-2;
  16.      If Xland<0 Then Xland:=0;
  17.      If Xland>319 Then Xland:=319;
  18.      Width:=Width+Random(5)-2;
  19.      If Width+Xland>319 Then Width:=319-Xland;
  20. End;
  21.  
  22. Procedure GlobalInit;
  23. Begin
  24.      Randomize;
  25.      Initgraph;
  26.      InitVirt;
  27. End;
  28.  
  29. Procedure GlobalClose;
  30. Begin
  31.      Closegraph;
  32.      Closevirt;
  33. End;
  34.  
  35. Procedure LandInit;
  36. Begin
  37.      SetColor(0,0,0,0);
  38.      SetColor(1,0,50,0);
  39.      SetColor(2,0,25,63);
  40.      Width:=150;
  41.      Xland:=50;
  42.      Cls(0,Vp[2]);
  43. End;
  44.  
  45. Begin
  46.      GlobalInit;
  47.      LandInit;
  48.  
  49.      Repeat
  50.            ScrollUpLand;
  51.            CopyPage(Vp[2],Vga);
  52.      Until Keypressed;
  53.  
  54.      GlobalClose;
  55. End.
  56.